*Building a Record

*use jpipe_data1.dta

*Figure 1
twoway (line all_house_amends year, sort lcolor(gs12) lwidth(medthick) lpattern(solid)) (line all_sen_amends year, sort lcolor(gs6) lwidth(medthick) lpattern(dash)) (lowess amend_diff year, sort yaxis(2) lcolor(black) lwidth(medthick)) if congress > 58 & congress <79, xline(1915, lwidth(medthick) lpattern(longdash) lcolor(black)) xlabel(1905(10)1945) legend(order(1 "House Amendments" 2 "Senate Amendments" 3 "Lowess")) ylabel(0(1000)4000) ytitle(" ") ylabel(0(200)800, axis(2)) title(" ") ytitle(" ", axis(2)) graphregion(fcolor(white))  legend(pos(6) col(3))

*Figure 2
twoway (line house_per5 year, sort lcolor(gs12) lwidth(medthick) lpattern(solid)) (line sen_per5 year, sort lcolor(gs6) lwidth(medthick) lpattern(dash)) if congress > 58 & congress <79, xline(1915, lwidth(medthick) lpattern(longdash) lcolor(black)) xlabel(1905(10)1945) legend(order(1 "House" 2 "Senate")) ylabel(0(50)200) ytitle(" ") graphregion(fcolor(white)) legend(pos(6) col(2))

*Figure 3
twoway (line all_house_nc_amends year, sort lcolor(gs12) lwidth(medthick) lpattern(solid)) (line all_sen_nc_amends year, sort lcolor(gs6) lwidth(medthick) lpattern(dash)) if congress > 58 & congress <79, xline(1915, lwidth(medthick) lpattern(longdash) lcolor(black)) xlabel(1905(10)1945) legend(order(1 "House Amendments" 2 "Senate Amendments")) ylabel(0(200)1000) ytitle(" ") graphregion(fcolor(white))legend(pos(6) col(2))

*use jpipe_data2.dta

*Table 1

*Model 1
nbreg all_amendments chamber post17 sen_post17 dwnom_distance maj_dummy chair ranking_member reelect current_tenure if congress <=78

*Model 2
nbreg nc_amends chamber post17 sen_post17 dwnom_distance maj_dummy chair ranking_member reelect current_tenure if congress <=78

*Model 3
nbreg all_amends_per5 chamber post17 sen_post17 dwnom_distance maj_dummy chair ranking_member reelect current_tenure if congress <=78

*Figure 4
nbreg nc_amends chamber post17 i.sen_post17 dwnom_distance maj_dummy chair ranking_member reelect current_tenure if congress <=78
margins i.sen_post17
marginsplot 

